<?php

declare(strict_types=1);

namespace App\Constants;

use Hyperf\Constants\AbstractConstants;
use Hyperf\Constants\Annotation\Constants;

#[Constants]
class ErrorCode extends AbstractConstants
{
    /**
     * @Message("Server Error！")
     */
    const SERVER_ERROR = 500;

    /**
     * @Message("params.id_invalid")
     */
    const PARAMS_ID_INVALID = 100001;
    /**
     * @Message("mail.sent_failed")
     */
    const MAIL_SEND_FAILED = 100002;
    /**
     * @Message("mail.sent_frequently")
     */
    public const CODE_SENT_FREQUENTLY = 100003;
    /**
     * @Message("user.exists")
     */
    public const USER_EXISTS = 200001;
    /**
     * @Message("form.error")
     */
    const FORM_ERROR = 400001;
    /**
     * @Message("mail.error")
     */
    const CODE_ERROR = 400002;
    /**
     * @Message("mail.expired")
     */
    const CODE_EXPIRED = 400003;
    /**
     * @Message("params.token_expired")
     */
    const Token_EXPIRED = 500001;
    /**
     * @Message("params.user_not_found")
     */
    const USER_NOT_EXISTS = 40014;
    /**
     * @Message("params.password_error")
     */
    const PASSWORD_ERROR = 40005;
    /**
     * @Message("params.forbidden")
     */
    const FORBIDDEN = 40004;
    /**
     * @Message("params.faild")
     */
    const FILE_UPLOAD_FAILED = 40005;
    /**
     * @Message("params.read")
     */
    const FILE_READ_FAILED = 40006;
    /**
     * @Message("params.ques_err")
     */
    const QUESTION_EXISTS = 40007;
    /**
     * @Message("params.ques_nor_err")
     */
    const QUESTION_NOT_EXISTS = 40008;
}
